#ifndef TFTEST_H
#define TFTEST_H

#include "TFDefineType.h"
#include <string>
#include <BDVector.h>
#include "minicsv.h"

class TFEventListener;
class TFTest
{

public:
	TFTest(std::string name);
	virtual ~TFTest();

	void Run();

	void AddEventListener(TFEventListener* listener);

	void Skip();

	void StartRecord(const std::string& path);
	void WriteRecord(BDVector<std::string>& stringList);
	void StopRecord();

	std::string GetTestName() {
		return m_sTestName;
	}

	void SetTestName(std::string name) {
		m_sTestName = name;
	}

	void SetStart(bool bStart) {
		m_bStartFlag = bStart;
	}

	void SetShouldRun(bool bShouldRun) {
		m_bShouldRun = bShouldRun;
	}

protected:

	bool m_bShouldRun;

	bool m_bStartFlag;

	std::string m_sTestName;

	csv::ofstream m_Csv;
	
	virtual bool TestBody();

	virtual void SetUp();

	virtual void TearDown();

	BDVector<TFEventListener*> m_vecListener;

	void NoticeTestStart();

	void NoticeTestEnd();

	void NoticeUpdateUI(unsigned int shapes, unsigned int data);
	
};

#endif